package com.stone.business.jxfa.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.stone.business.jxfa.pojo.TJxfa;
import com.stone.business.jxfa.service.JxfaService;
import com.stone.utils.StringUtils;

import frm.ssh.action.BaseListAction;

@SuppressWarnings("serial")
public class JxfaListAction extends BaseListAction {

	private JxfaService jxfaService;
	
	public JxfaService getJxfaService() {
		return jxfaService;
	}

	public void setJxfaService(JxfaService jxfaService) {
		this.jxfaService = jxfaService;
		this.service=jxfaService;
	}
	
	/** * 构造方法. */
    public JxfaListAction() {
        this.entityClass = TJxfa.class;
    }
    
	/**
	 * 设置查询条件
	 */
	public HashMap<String, Object> setSearchCondition() {
		
		HashMap<String, Object> m = new HashMap<String, Object>();
		List<Object> valsList = new ArrayList<Object>();
		
		m.put("cols", "jxfa");

		String conditions = "";
		
		// 状态
		if(!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon20())){
			conditions += " jxfa.status = '" + super.getSearchBean().getCon20() + "'";
		}
		
		if(!StringUtils.isNullOrBlankFull(super.getSearchBean().getCon4())){
			conditions += " jxfa.famc = '" + super.getSearchBean().getCon4() + "'";
		}

		m.put("conditions",conditions);
		m.put("clause"," order by jxfa.id desc");
		m.put("alias", "jxfa");
		//m.put("vals", valsList.toArray());
		
		return m;
		
	}
}

